
#include "core/utils.h"
#include <unistd.h>

static int g_cpu_count = 0;

int ve_cpu_count()
{
    if( !g_cpu_count )
    {
        /* /proc should be mounted */
        g_cpu_count = sysconf( _SC_NPROCESSORS_ONLN );
        if( g_cpu_count < 1 )
            g_cpu_count = 1;
    }
    return g_cpu_count;
}

void ve_sleep( int msec )
{
    usleep(1000*msec);
}

int ve_get_time()
{
	/* TODO */
	return 0;
}
